package com.cdy.store.manager;

import io.netty.buffer.ByteBuf;

import java.io.File;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;

/**
 * 文件系统接口
 * Created by 陈东一
 * 2019/10/20 0020 12:20
 */
public interface FileSystem {
    
    File findFile(String fileName) throws Exception;
    
    void writeFile(File file, ByteBuffer byteBuffer, Long begin) throws Exception;

    FileChannel openChannel(File file) throws Exception;

    void closeChannel(File file) throws Exception;

    ByteBuf readFile(File file, Long begin, int length) throws Exception;
}
